home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / makemdi2.zip / SHEET.H < prev    next >
C/C++ Source or Header  |  1992-11-25  |  3KB  |  86 lines

  1. #ifndef CLASS_SHEET
  2. #define CLASS_SHEET "MakeMDI_Sheet"
  3. // ==========================================================Purpose 
  4. // SHEET.H - MDI Sheet window managment. 
  5. // 
  6. // MAKEMDI adaptation of Windows 3.1 SDK MAKEAPP system. 
  7. // 
  8. // MDI application design based on Chapter 7 of     
  9. // "Windows 3: A Developer's Guide" by Jeffrey Richter. 
  10. // 
  11. // Adaptation developed with permission of the author by  
  12. // John F. Holliday, Technisoft Corporation 
  13. // Telephone: (515) 472-9803, CompuServe: 71271,634 
  14. //
  15. // [DMM]    25-Nov-1992: Fixed crashing on exit
  16. //            Also tabified file to tabsize of 4
  17. //
  18. //            David M. Miller, Business Visions, Inc.
  19. //            Telephone: (212) 747-6118
  20. //            CompuServe: 72676,327
  21. //            internet: dmiller@hera.sbi.com
  22. // ==========================================================Private 
  23.  
  24. // Window procedure 
  25.  
  26. LRESULT CALLBACK _export Sheet_WndProc(HWND, UINT, WPARAM, LPARAM);
  27.  
  28.  
  29. // Default message handler 
  30.  
  31. #define Sheet_DefProc                DefMDIChildProc
  32.  
  33.  
  34. // Instance data structure 
  35.  
  36. typedef struct tagSHEET {
  37.     HWND            hWnd;
  38.     HWND            hWndPrevChild;
  39.     HMENU            hMenu;
  40.     HANDLE            hAccelTable;
  41.     COLORREF        clrText;
  42.     LPCSTR            lpszText;
  43. }                SHEET;
  44.  
  45.  
  46. // Instance data pointer access functions 
  47.  
  48. #if defined(M_I86SM) | defined(M_I86MM)
  49. #define Sheet_GetPtr(hWnd)               (SHEET*)GetWindowWord((hWnd), 0)
  50. #define Sheet_SetPtr(hWnd, psheet)       (SHEET*)SetWindowWord((hWnd), 0, (WORD)(psheet))
  51. #else
  52. #define Sheet_GetPtr(hWnd)               (SHEET*)GetWindowLong((hWnd), 0)
  53. #define Sheet_SetPtr(hWnd, psheet)       (SHEET*)SetWindowLong((hWnd), 0, (LONG)(psheet))
  54. #endif
  55.  
  56. // Message handler functions 
  57.  
  58. BOOL            Sheet_OnCreate(SHEET *, CREATESTRUCT FAR *);
  59. int                Sheet_OnMouseActivate(SHEET *, HWND, UINT, UINT);
  60. void            Sheet_OnMenuSelect(SHEET *, HMENU, int, HMENU, UINT);
  61. void            Sheet_OnEnterIdle(SHEET *, UINT, HWND);
  62. BOOL            Sheet_OnSetCursor(SHEET *, HWND, UINT, UINT);
  63. void            Sheet_OnLButtonDown(SHEET *, BOOL, int, int, UINT);
  64. void            Sheet_OnClose(SHEET *);
  65.  
  66. void            Sheet_OnMdiActivate(SHEET *, BOOL, HWND, HWND);
  67. void            Sheet_OnDestroy(SHEET *);
  68. void            Sheet_OnPaint(SHEET *);
  69. BOOL            Sheet_OnEraseBkgnd(SHEET *, HDC);
  70. BOOL            Sheet_OnQueryEndSession(SHEET *);
  71. void            Sheet_OnEndSession(SHEET *, BOOL);
  72. void            Sheet_OnCommand(SHEET *, int, HWND, UINT);
  73. void            Sheet_OnPaintStatBar(SHEET *, HDC, LPPAINTSTRUCT);
  74. void            Sheet_OnPaintMenuHelp(SHEET *, LPPAINTSTRUCT);
  75.  
  76.  
  77. // ===========================================================Public 
  78.  
  79. BOOL            Sheet_Initialize(APP * papp);
  80. void            Sheet_Terminate(APP * papp);
  81.  
  82. HWND            Sheet_CreateWindow(HWND hWndParent, int x, int y, int cx, int cy, BOOL fVisible, COLORREF clrText, LPCSTR lpszText);
  83.  
  84. // ==============================================================End 
  85. #endif                            // !CLASS_SHEET
  86.